import java.io.BufferedWriter;
import java.io.FileWriter;
import java.util.ArrayList;




public class Utility {
	
	public static void CreateFiles(ArrayList<Integer> episodesSteps, ArrayList<Integer> episodesCollReward){
	
		try{
			  // Create file 
			  FileWriter fstream = new FileWriter("episodeVSnbsteps.txt");
			  BufferedWriter out = new BufferedWriter(fstream);
			  
			  for(Integer i =0 ; i < episodesSteps.size(); i++)
				  out.write( (i+1) + " " + episodesSteps.get(i)+ "\n");
			
			  out.close();
			  
			  // Create file 
			  fstream = new FileWriter("episodeVcollReward.txt");
			  out = new BufferedWriter(fstream);
			  
			  for(Integer i =0 ; i < episodesCollReward.size(); i++)
				  out.write( (i+1) + " " + episodesCollReward.get(i)+ "\n");
			
			  out.close();
			  
			  }catch (Exception e){//Catch exception if any
			      System.err.println("Error: " + e.getMessage());
			  }
	}

}
